<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css" />
    <style type="text/css">
        body{
            font-size: 14px;
        }
        .header_address{
            background: #4f6ea6;
            padding:15px 10px;
            color:#fff;
        }
        .order_header{
            background: #fff;
            padding: 12px 15px;
            font-size: 16px;
            color: #666;
        }
    </style>
</head>
<body>
    <div class="aui-content header_address" id="address-content" tapmode onclick="openToTwo('my/addressList_win')">
    </div>
    <div class="aui-content" id="order-content"></div>

    <!-- <span class="aui-iconfont aui-icon-location icon"></span>
    <div class="contents">
        <span class="name aui-pull-left">收货人：{{=it.truename}}</span>
        <span class="phone aui-pull-right">{{=it.mobile}}</span>

        <div class="content address">收货地址：{{=it.city}} {{=it.address}}</div>
    </div>

    <div class="good-info">
        <div class="company-name ">
            <span class="active">订单：</span>
            <label class="name ">{{=it[i].company}}</label>
        </div>
        <ul class="aui-list-view">
            {{ for (var is in it[i].goods){ }}
            <li class="aui-list-view-cell aui-img aui-counter-list">
                <img class="aui-img-object aui-pull-left" src="{{=it[i].goods[is].thumb}}">

                <div class="aui-img-body">
                    <span class="good-name aui-ellipsis-2">{{=it[i].goods[is].title}}</span>

                    <div class="good-info-lists">
                        <div class="good-info-list aui-ellipsis-2">{{=it[i].goods[is].spec}}</div>
                        <div class=" aui-pull-left good-pirce">￥{{=it[i].goods[is].price}}</div>
                        <div class=" aui-pull-right">x<span class="good-count">{{=it[i].goods[is].goodsNumber}}</span>
                        </div>
                    </div>
                </div>
            </li>
            {{ } }}
        </ul>
        <div class="good_bottom ">
            <ul class="aui-list-view">
                <li class="aui-list-view-cell">
                    <a class="aui-arrow-right">
                        运费计算
                        <span class="menuRgiht tixianType">￥{{=it[i].express}}元</span>
                    </a>
                </li>
                <li class="aui-list-view-cell">
                    <input type="text" placeholder="给卖家留言">
                </li>
                <li class="aui-list-view-cell">
                    <span class="aui-pull-right xiaoji">小计：<em class="good-pirce">￥{{=it[i].orderPrice}}</em></span>
                    <span class="aui-pull-right xiaoji">{{=it[i].orderNumber}}件</span>
                </li>
            </ul>
        </div>
    </div> -->


</body>
<script id="address-template" type="text/x-dot-template">

<div class="aui-flex-col">
    <div class="aui-flex-item-11">
       
         <div class="aui-flex-col">
            <div class="aui-flex-item-1"></div>
            <div class="aui-flex-item-6">{{=it.truename}}</div>
            <div class="aui-flex-item-5" style="text-align: right;">{{=it.mobile}}</div>
        </div>
        <div class="aui-flex-col">
            <div class="aui-flex-item-1" style="text-align: center;"><span class="aui-iconfont aui-icon-location"></span></div>
            <div class="aui-flex-item-11">收货地址：{{=it.city}} {{=it.address}}</div>
        </div> 

    </div>
    <div id="rightIconRow" class="aui-flex-item-1" style="text-align: right;">
        <span class="aui-iconfont aui-icon-right"></span>
    </div>
</div>

</script>
<script id="order-template" type="text/x-dot-template">
    <div class="order_header">货品清单</div>
    {{ for(var i in it){ }}
    <ul class="aui-list-view aui-in" style="margin:0;">
        <li class="aui-list-view-cell">
            订单：{{=it[i].company}}
        </li>
        {{ for(var j in it[i].goods){ }}
        <li class="aui-list-view-cell aui-img">
            <img class="aui-img-object aui-pull-left" src="{{=it[i].goods[j].thumb}}">
            <div class="aui-img-body">
                {{=it[i].goods[j].title}}
                <!-- <p>图文列表缩略图在左边的样式，默认大小为80PX，文字介绍内容可以为一行也可以为两行，超出部分自动省略</p> -->
            </div>
            <div class="aui-clearfix">
                <div class="aui-flex-col" style="background: #f3f3f3;padding:8px 15px;color:#666;margin-top: 10px;font-size: 12px;">
                    <div class="aui-flex-item-6" style="padding-top: 6px;">
                        <div>规格：{{=it[i].goods[j].spec}}</div>
                        <div>单价：<span>¥{{=it[i].goods[j].price/it[i].goods[j].goodsNumber}}</span></div>
                    </div>
                    <div class="aui-flex-item-6" style="text-align: right;">
                        <div style="font-size: 18px;">¥{{=it[i].goods[j].price}}</div>
                        <div>{{=it[i].goods[j].goodsNumber}}件</div>
                    </div>
                </div>
            </div>
        </li>
        {{ } }}
        <li class="aui-list-view-cell">
            <div class="aui-arrow-right">
                运费计算
                <span class="aui-pull-right" style="margin-right: 20px;color:#666;">¥{{=it[i].express}}</span>
            </div>
        </li>
        <li class="aui-list-view-cell">
            <textarea placeholder="给卖家留言" name="text" style="height: 45px;overflow: auto;margin:0;"></textarea>
        </li>
    </ul>
    <div class="order_header" style="text-align: right;margin-bottom: 15px;">{{=it[i].orderNumber}}件 | 小计 <span class="aui-text-danger" style="font-size: 18px;">{{=it[i].orderPrice}}</span></div>
    {{ } }}
</script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript" src="../script/jquery-1.11.3.js"></script>
<script type="text/javascript">
    var orderData,addressData;
    apiready = function() {
        api.parseTapmode();
        getStorageAll();

        orderData=api.pageParam.orderData;
        addressData=api.pageParam.addressData;

        renderAddress(addressData);
        renderOrder(orderData);

        var addressContentHeight=$('#address-content').height();
        $('#rightIconRow').css({'height':addressContentHeight+'px','line-height':addressContentHeight+'px'});
    }
    function renderAddress(addressData){
        var content = $api.byId('address-content');
        var tpl = $api.byId('address-template').text;
        var tempFn = doT.template(tpl);
        $api.html(content, tempFn(addressData));
    }

    function renderOrder(orderData){
        var content = $api.byId('order-content');
        var tpl = $api.byId('order-template').text;
        var tempFn = doT.template(tpl);
        $api.html(content, tempFn(orderData));
    }
</script>
</html>
